package com.songshuai.webapi.crm.dto.request.customer;

import com.songshuai.webapi.crm.util.Util;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class AddCustomerInfoReqDto {
    //学员姓名
    @NotBlank(message = "姓名不能为空")
    private String customName;
    //性别
    private Integer sex;
    //号码关系
    @NotNull(message = "手机号关联不能为空")
    private Integer relation;
    //手机号码
    @NotBlank(message = "手机号不能为空")
    private String phone;
    //备用号码联系人
    private Integer relationBackup;
    //备用号码
    private String phoneBackup;
    //出生日期
    private String birthday;
    public Date getBirthday() {
        return Util.ChangeStringToDate(birthday,"yyyy-MM-dd");
    }

    //家庭住址
    private String homeAddress;
    //学校
    private String school;
    //阶段
    private Integer stage;
    //年级
    private Integer grade;
    //意向级别
    private Integer intend;
    //来源
    private Integer firstSource;
    //备注
    private String remark;
}
